<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" />
<title>Config.ini Description</title>
<meta name="author" content="limodou" />
<meta name="copyright" content="GPL" />
<style type="text/css">

/*
:Author: David Goodger
:Contact: goodger@users.sourceforge.net
:Date: $Date: 2005-12-18 01:56:14 +0100 (Sun, 18 Dec 2005) $
:Revision: $Revision: 4224 $
:Copyright: This stylesheet has been placed in the public domain.

Default cascading style sheet for the HTML output of Docutils.

See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/

/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
  border: 0 }

table.borderless td, table.borderless th {
  /* Override padding for "table.docutils td" with "! important".
     The right padding separates the table cells. */
  padding: 0 0.5em 0 0 ! important }

.first {
  /* Override more specific margin styles with "! important". */
  margin-top: 0 ! important }

.last, .with-subtitle {
  margin-bottom: 0 ! important }

.hidden {
  display: none }

a.toc-backref {
  text-decoration: none ;
  color: black }

blockquote.epigraph {
  margin: 2em 5em ; }

dl.docutils dd {
  margin-bottom: 0.5em }

/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
  font-weight: bold }
*/

div.abstract {
  margin: 2em 5em }

div.abstract p.topic-title {
  font-weight: bold ;
  text-align: center }

div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
  margin: 2em ;
  border: medium outset ;
  padding: 1em }

div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
  font-weight: bold ;
  font-family: sans-serif }

div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title {
  color: red ;
  font-weight: bold ;
  font-family: sans-serif }

/* Uncomment (and remove this text!) to get reduced vertical space in
   compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
  margin-bottom: 0.5em }

div.compound .compound-last, div.compound .compound-middle {
  margin-top: 0.5em }
*/

div.dedication {
  margin: 2em 5em ;
  text-align: center ;
  font-style: italic }

div.dedication p.topic-title {
  font-weight: bold ;
  font-style: normal }

div.figure {
  margin-left: 2em ;
  margin-right: 2em }

div.footer, div.header {
  clear: both;
  font-size: smaller }

div.line-block {
  display: block ;
  margin-top: 1em ;
  margin-bottom: 1em }

div.line-block div.line-block {
  margin-top: 0 ;
  margin-bottom: 0 ;
  margin-left: 1.5em }

div.sidebar {
  margin-left: 1em ;
  border: medium outset ;
  padding: 1em ;
  background-color: #ffffee ;
  width: 40% ;
  float: right ;
  clear: right }

div.sidebar p.rubric {
  font-family: sans-serif ;
  font-size: medium }

div.system-messages {
  margin: 5em }

div.system-messages h1 {
  color: red }

div.system-message {
  border: medium outset ;
  padding: 1em }

div.system-message p.system-message-title {
  color: red ;
  font-weight: bold }

div.topic {
  margin: 2em }

h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
  margin-top: 0.4em }

h1.title {
  text-align: center }

h2.subtitle {
  text-align: center }

hr.docutils {
  width: 75% }

img.align-left {
  clear: left }

img.align-right {
  clear: right }

ol.simple, ul.simple {
  margin-bottom: 1em }

ol.arabic {
  list-style: decimal }

ol.loweralpha {
  list-style: lower-alpha }

ol.upperalpha {
  list-style: upper-alpha }

ol.lowerroman {
  list-style: lower-roman }

ol.upperroman {
  list-style: upper-roman }

p.attribution {
  text-align: right ;
  margin-left: 50% }

p.caption {
  font-style: italic }

p.credits {
  font-style: italic ;
  font-size: smaller }

p.label {
  white-space: nowrap }

p.rubric {
  font-weight: bold ;
  font-size: larger ;
  color: maroon ;
  text-align: center }

p.sidebar-title {
  font-family: sans-serif ;
  font-weight: bold ;
  font-size: larger }

p.sidebar-subtitle {
  font-family: sans-serif ;
  font-weight: bold }

p.topic-title {
  font-weight: bold }

pre.address {
  margin-bottom: 0 ;
  margin-top: 0 ;
  font-family: serif ;
  font-size: 100% }

pre.literal-block, pre.doctest-block {
  margin-left: 2em ;
  margin-right: 2em ;
  background-color: #eeeeee }

span.classifier {
  font-family: sans-serif ;
  font-style: oblique }

span.classifier-delimiter {
  font-family: sans-serif ;
  font-weight: bold }

span.interpreted {
  font-family: sans-serif }

span.option {
  white-space: nowrap }

span.pre {
  white-space: pre }

span.problematic {
  color: red }

span.section-subtitle {
  /* font-size relative to parent (h1..h6 element) */
  font-size: 80% }

table.citation {
  border-left: solid 1px gray;
  margin-left: 1px }

table.docinfo {
  margin: 2em 4em }

table.docutils {
  margin-top: 0.5em ;
  margin-bottom: 0.5em }

table.footnote {
  border-left: solid 1px black;
  margin-left: 1px }

table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
  padding-left: 0.5em ;
  padding-right: 0.5em ;
  vertical-align: top }

table.docutils th.field-name, table.docinfo th.docinfo-name {
  font-weight: bold ;
  text-align: left ;
  white-space: nowrap ;
  padding-left: 0 }

h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
  font-size: 100% }

tt.docutils {
  background-color: #eeeeee }

ul.auto-toc {
  list-style-type: none }

</style>
</head>
<body>
<div class="document" id="config-ini-description">
<h1 class="title">Config.ini Description</h1>
<table class="docinfo" frame="void" rules="none">
<col class="docinfo-name" />
<col class="docinfo-content" />
<tbody valign="top">
<tr><th class="docinfo-name">Author:</th>
<td>limodou</td></tr>
<tr><th class="docinfo-name">Contact:</th>
<td><a class="first last reference" href="mailto:limodou&#64;gmail.com">limodou&#64;gmail.com</a></td></tr>
<tr class="field"><th class="docinfo-name">Homepage:</th><td class="field-body"><a class="reference" href="http://code.google.com/p/ulipad/">http://code.google.com/p/ulipad/</a></td>
</tr>
<tr class="field"><th class="docinfo-name">BLOG:</th><td class="field-body"><a class="reference" href="http://www.donews.net/limodou">http://www.donews.net/limodou</a></td>
</tr>
<tr><th class="docinfo-name">Copyright:</th>
<td>GPL</td></tr>
</tbody>
</table>
<p>UliPad supports many customized works, but many of them don't has a visual or GUI
operation interface. So here is detail description about it.</p>
<p>As default, config.ini will not be created, untill you change some settings of
UliPad. So if you want to change the option in config.ini, and there is no such
a file, you can create this file manually in UliPad installed folder or its conf
folder, that's the same. I always create it in UliPad installed folder, because you
can easily find it.</p>
<div class="section">
<h1><a id="debug-mode" name="debug-mode">Debug mode</a></h1>
<p>When you installed UliPad, it'll not create debug information. But the debug.txt
will created automatically, just it's empty. And if you turn on the debug option,
many things in UliPad will be output into debug.txt, for example: menu items infos,
shortcuts infos, plugin &amp; mixin infos, etc. So How to turn on it:</p>
<pre class="literal-block">
[default]
debug = 1
</pre>
<p>So if the <cite>debug</cite> is <cite>1</cite>, the debug infos will output to debug.txt. If the <cite>debug</cite>
is <cite>0</cite>, then the there will no debug infos.</p>
</div>
<div class="section">
<h1><a id="change-the-shortcuts-of-menu-item" name="change-the-shortcuts-of-menu-item">Change the shortcuts of menu item</a></h1>
<p>UliPad enable you change the shortcuts of menu items. But the work has some hard
work now. So how to define them in config.ini? There are two section used in
config.ini. <cite>main_hotkey</cite> is aimed for mainframe shortcus. And <cite>editor_hotkey</cite> is
aimed for only editor shortcuts. For example:</p>
<pre class="literal-block">
[main_hotkey]
IDM_FILE_SAVEAS=F12
</pre>
<p>So you can see the key if menu item's ID, and the value is key name. Key name could
be: F1, A, Ctrl, Shift, Alt, etc. And you can use <cite>+</cite> to combine control key and
normal key, for example: Ctrl+A.</p>
<p>And how to find the menu item ID.</p>
<ol class="arabic">
<li><p class="first">Open mixins/Import.py source file, and serach menu items definition, for example:</p>
<pre class="literal-block">
(100, 'IDM_FILE_NEW', tr('New') + '\tCtrl+N', wx.ITEM_NORMAL,
    'OnFileNew', tr('Creates a new document')),
(105, 'IDM_FILE_NEWMORE', tr('New') + '...', wx.ITEM_NORMAL,
    None, tr('Creates a new document')),
(110, 'IDM_FILE_OPEN', tr('Open') + '\tCtrl+O', wx.ITEM_NORMAL,
    'OnFileOpen', tr('Opens an existing document')),
</pre>
<p>So you can find <cite>IDM_FILE_NEW</cite> is the menu time ID.</p>
</li>
<li><p class="first">Enable debug mode, and you can serch:</p>
<pre class="literal-block">
[ INFO] -- [makemenu] makeaccelerator...
[ INFO] --  IDM_FILE_NEWMORE_NULL []
[ INFO] --  IDM_FILE_NEW [Ctrl+N]
[ INFO] --  IDM_FILE_NEWMORE []
[ INFO] --  IDM_FILE_OPEN [Ctrl+O]
[ INFO] --  IDM_FILE_REOPEN [Ctrl+Shift+O]
[ INFO] --  IDM_FILE_RECENTFILES []
</pre>
<p>So you can see the IDs and its shortcuts. If an ID has no shortcuts definition, the
list following it is <cite>[]</cite>.</p>
</li>
</ol>
</div>
<div class="section">
<h1><a id="change-default-font-of-editor-message-window-shell-window" name="change-default-font-of-editor-message-window-shell-window">Change default font of Editor, Message Window, Shell Window</a></h1>
<p>If you don't like the default font of editor, message window, shell window, you can change
them:</p>
<pre class="literal-block">
[default]
editor_font = &quot;fontname&quot;
editor_fontsize = 10
message_font = &quot;fontname&quot;
message_fontsize = 10
shell_font = &quot;fontname&quot;
shell_fontsize = 10
</pre>
<p>And you can also change the caret line background color:</p>
<pre class="literal-block">
[default]
message_caretlineback = #FF0000
</pre>
<p>Here the color is represented as <cite>#XXXXXX</cite>. I think you can also use <cite>red</cite>, <cite>green</cite>, etc.</p>
</div>
<div class="section">
<h1><a id="change-the-file-icons-of-directory-browser" name="change-the-file-icons-of-directory-browser">Change the file icons of Directory Browser</a></h1>
<p>UliPad can recognize some files type, and show different icons to these files. And if you don't
like these icons and want to add some new file icons, you can change them in config.ini. For now,
UliPad supports: .txt, .ini, .html, .py, .pyw, .xml, .bat, .htm.</p>
<pre class="literal-block">
[fileimages]
.pyw = file_py.gif
.c = item.gif
.ini = file_txt.gif
.py = file_py.gif
.txt = file_txt.gif
.html = file_html.gif
.xml = file_xml.gif
.bat = file_txt.gif
.htm = file_html.gif
</pre>
<p>If you want to change them, first you should add new image file in $(UliPad)/images folder, the
image file format could be .gif or .png. Then add like above, the key is suffix of the filename,
and the value is the icon filename.</p>
</div>
<div class="section">
<h1><a id="ignore-files-in-directory-browser" name="ignore-files-in-directory-browser">Ignore files in Directory Browser</a></h1>
<p>UliPad can ignore some file types, you can change them:</p>
<pre class="literal-block">
[ignore]
matches = .*,*.pyc,*.bak,*.ico,*.m3u,
</pre>
<p>Above is default. And it'll be available in global.</p>
</div>
<div class="section">
<h1><a id="change-todo-pattern" name="change-todo-pattern">Change TODO pattern</a></h1>
<p>UliPad supports TODO. For some source files, there some predefined pattern, they are regular
expression, for example:</p>
<pre class="literal-block">
python/ruby/perl:

^\s*#\s*[tT][oO][dD][oO]\s+(.*?)$
</pre>
<p>Examples:</p>
<pre class="literal-block">
#TODO TEST              Valid
   # todo TEST          Valid
print aaa #todo test    Invalid
</pre>
<p>c/c++/java:</p>
<pre class="literal-block">
^\s*//\s*[tT][oO][dD][oO]\s+(.*?)$
^\s*/\*\s*[tT][oO][dD][oO]\s+(.*?)$
</pre>
<p>Examples:</p>
<pre class="literal-block">
//todo TEST     Valid
  /* todo TEST  Valid
printf() //todo Invalid
</pre>
<p>And if there is a file type, that UliPad doesn't support it yet, you can define them:</p>
<pre class="literal-block">
[todo_pattern]
ruby = &quot;^\s*#\s*[tT][oO][dD][oO]\s+(.*?)$&quot;
</pre>
<p>If the todo format is multipule, you should define them as a <cite>list</cite> format -- you should delimit
them with ',', and the each pattern should be quoted with double quoter(<cite>&quot;</cite>), for example:</p>
<pre class="literal-block">
c = &quot;^\s*//\s*[tT][oO][dD][oO]\s+(.*?)$&quot;,&quot;^\s*/\*\s*[tT][oO][dD][oO]\s+(.*?)$&quot;
</pre>
<p>Note, the key is not the file suffix, but the language lexer name. And for now, UliPad support,
asp, c, css, djangotmp, fortran, html, java, js, perl, php, python, rst, ruby, text, xml.</p>
<p>Note, for djangotmp, you should install djangoproj plugin. And for fortran, you should install
fortran plugin. for ruby, you should install ruby plugin.</p>
</div>
<div class="section">
<h1><a id="change-comment-chars" name="change-comment-chars">Change comment chars</a></h1>
<p>You can change the comment chars in UliPad. These chars can be used in Comment and Uncomment
menu. Or press <cite>Ctrl+/</cite> to comment text and press <cite>Ctrl+\</cite> to uncomment text.</p>
<pre class="literal-block">
[comment_chars]
c = //
python = #
default = #
</pre>
<p>Note, the key is not the file suffix, but the language lexer name. But <cite>default</cite> is not a language
name, just a default value.</p>
</div>
<div class="section">
<h1><a id="change-lanague" name="change-lanague">Change lanague</a></h1>
<p>UliPad support i18n, and when you change the lanague, it'll save the selection in config.ini.
So you can change it:</p>
<pre class="literal-block">
[language]
default =
</pre>
<p>If default is empty, then UliPad will aotomatically detect language. If the i18n has some problem,
you can set it <cite>en</cite> to use English language.</p>
</div>
</div>
</body>
</html>
